<template>
  <Card>
    <div class="table">
      <div class="th">
        <p>
          <span>关键词</span>
          <span>搜索变化率</span>
        </p>
      </div>
      <div class="tb">
        <p>
          <span v-title>第二名的逆袭在线观看</span>
          <span>
            <div class="percent">
              <t class="a" style="width: 100%" />
              <t class="b" />
            </div>
            <span>100%</span>
          </span>
        </p>
        <p>
          <span v-title>第二名的逆袭在线观看</span>
          <span>
            <div class="percent">
              <t class="a" style="width: 86%" />
              <t class="b" />
            </div>
            <span>86%</span>
          </span>
        </p>
        <p>
          <span v-title>第二名的逆袭在线观看</span>
          <span>
            <div class="percent">
              <t class="a" style="width: 86%" />
              <t class="b" />
            </div>
            <span>86%</span>
          </span>
        </p>
        <p>
          <span v-title>第二名的逆袭在线观看</span>
          <span>
            <div class="percent">
              <t class="a" style="width: 86%" />
              <t class="b" />
            </div>
            <span>86%</span>
          </span>
        </p>
      </div>
    </div>

    <p class="pl_20" style="color:#CBD2D5">
      <ExclamationCircleOutlined />
      <span>搜索变化率</span>
      <p>算法说明：反映用户在搜索中心词相关搜索汇总，并综合计算汇总词的环比变化率，并以变化率的绝对值降序排名，箭头方向表示环比增加/环</p>
    </p>
  </Card>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import Card from "@/components/Card";
</script>

<style lang="less" scoped>
.table {
  height: calc(100% - 60px);
  display: flex;
  flex-direction: column;

  .th > p,
  .tb > p {
    padding: 15px 20px;
    font-size: 14px;

    display: flex;
    align-content: center;
    > span {
      width: 50%;
      padding: 0 10px;
      display: inline-block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
      &:nth-child(1) {
        width: 33%;
      }
      &:nth-child(4) {
        flex: 1;
      }
    }
  }

  .th {
    color: #cbd2d5;
    font-size: 16px;
  }
  .tb {
    flex: 1;
    overflow-y: auto;
  }
  .tb > p {
    background: #131313;
    border-radius: 5px;
    margin-bottom: 10px;

    .percent {
      width: 70%;
      position: relative;
      display: inline-flex;
      .a {
        padding: 5px 0;
        border-radius: 5px;
        background: linear-gradient(90deg, #f5be5a 0%, #ff783f 100%);
        box-shadow: 0px 2px 6px 0px rgba(44, 205, 197, 0.2);
        position: absolute;
        left: 0;
      }
      .b {
        width: 100%;
        padding: 5px 0;
        border-radius: 5px;
        background: #f5f7fa;
        margin-right: 5px;
      }
      .t {
        position: absolute;
      }
    }
  }
}
</style>
